package com.gloabalroam.testleak;

import android.app.Activity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/7/22 0022.
 */
public class ActivityManager {
    private List mActivities = new ArrayList<>();
    private static ActivityManager sInstance;

    private ActivityManager() {
    };

    public static ActivityManager instance() {
        if (sInstance == null) {
            sInstance = new ActivityManager();
        }

        return sInstance;
    }

    public void registActivity(Activity activity) {
        mActivities.add(activity);
    }

    public void unRigistActivity(Activity activity) {
        mActivities.remove(activity);
    }
}